﻿<?php defined('_JEXEC') or die('Restricted access'); 
$order = $this->order;
$total = 0;
?>
<body style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; ">

<table style="width:780px; margin:0px auto; padding:10px;" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><a style=" background:url(templates/cafe_shop/src/images/imgLogo.png) no-repeat; text-indent:-9999px; width:180px; height:93px; display:block; " href="index.php">Danskcafe</a></td>
  </tr>
  <tr>
  	<td colspan="1">
    	<table width="780px" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td style="background-color:#ea1d2b; padding:1px; color:white; font-size:15px; font-weight:bold;" colspan="2" >Faktura</td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px;" width="313">Faktura nummer:</td>
            <td width="467" style="color:#323232; font-size:12px; padding:1px;"><?php echo sprintf("%05d", $order->order_id)?></td>
          </tr>
		  <tr>
            <td style="color:#323232; font-size:12px; padding:1px;" width="313">Faktura dato:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo date('d-m-Y', $order->order_date);?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px;" width="313">Tidspunkt:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo date('H:i:s', $order->order_date);?></td>
          </tr>
          <tr>
            <td style="background-color:#ea1d2b; padding:1px; color:white; font-size:15px; font-weight:bold;" colspan="2" >Kundeinformation</td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">Firma/institution:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->company;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">Kontaktperson:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->name;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">Adresse:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->address;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">Postnr.:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->post;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">By:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->city;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">Telefon/mobil:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->phone;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">CVR-nr.:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->cvr;?></td>
          </tr>
          <tr>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; ">E-mail:</td>
            <td style="color:#323232; font-size:12px; padding:1px; width:30%; "><?php echo $order->email;?></td>
          </tr>	 
       </table>
    </td>
  </tr>
  <tr>
  	<td style="border-bottom: 1px solid #ea1d2b;">
  		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
	            <td style="background-color:#ea1d2b; padding:1px; color:white; font-size:15px; font-weight:bold;" colspan="8" >Ordrelinier</td>
	        </tr>
			<tr>
		       	<td width="85" style="color:#323232; font-size:11px; text-align:center; padding:1px; ">Varenr</td>
		       	<td width="241" style="color:#323232; font-size:11px; text-align:center; padding:1px; ">Varenavn</td>
		       	<td width="125" style="color:#323232; font-size:11px; text-align:center; padding:1px; ">Pris/enhed</td>
                <td width="117" style="color:#323232; font-size:11px; text-align:center; padding:1px; ">Antal</td>
                <td width="212" style="color:#323232; font-size:11px; text-align:center; padding:1px; ">Subtotal</td>    
		    </tr>
			<?php foreach($order->products as $pro){
		    ?>
			<tr>
		       	<td style="color:#323232; font-size:11px; text-align:center; padding:1px; "><?php echo $pro->number;?></td>
		       	<td style="color:#323232; font-size:11px; text-align:center; padding:1px; "><?php echo $pro->product_name;?></td>
		       	<td style="color:#323232; font-size:11px; text-align:center; padding:1px; "><?php echo $pro->price;?> kr</td>
				<td style="color:#323232; font-size:11px; text-align:center; padding:1px; "><?php echo $pro->quantity;?></td>
				<td style="color:#323232; font-size:11px; text-align:center; padding:1px; "><?php echo $pro->total;?> kr</td>
		    </tr>
			<?php
				$total += $pro->total;
				}
			?>
                
        </table>
  	</td>
  </tr>
  <tr>
  	<td style="text-align: right; color:#323232; font-size:12px; padding:0px; padding:2px 43px 50px 0; font-weight: bold;">At betale: <?php echo $total;?> kr</td>
  </tr>
  <tr>
  	<td style="background-color:#ea1d2b; padding:1px; ">
  		<p style="color:#FFF; font-size:13px; margin:0;">Dansk Cafe Service - Vesterbrogade 74,3. sal - 1620 København V - Tlf: +45 26 80 88 11</p> 
  		<p style="color:#FFF; font-size:13px; margin:0;">Mail: <a onMouseOver="this.style.textDecoration = 'underline'" onMouseOut="this.style.textDecoration = 'none'" style="display:inline; text-decoration: none; color:#FFF;" href="mailto:post@danskcafeservice.dk">post@danskcafeservice.dk</a> - CVR: 30892968</p>
  	
	</td>
  </tr>
</table>
</body>